package com.gdpu.project.dao;

import java.util.List;

import com.gdpu.page.vo.QueryResult;
import com.gdpu.project.vo.Email;
import com.gdpu.project.vo.News;

public interface EmailDao {

	public abstract void save(Email transientInstance);

	public abstract void delete(Email persistentInstance);

	public abstract Email findById(java.lang.Integer id);

	public abstract List<Email> findByExample(Email instance);

	public abstract List<Email> findByProperty(String propertyName, Object value);

	public abstract List<Email> findByReceiver(Object receiver);

	public abstract List<Email> findBySender(Object sender);

	public abstract List<Email> findByEmailTitle(Object emailTitle);

	public abstract List<Email> findByEmailInfo(Object emailInfo);

	public abstract List<Email> findByFile(Object file);

	public abstract List<Email> findByReadFlag(Object readFlag);

	public abstract List<Email> findAll();
	
	public QueryResult<Email> findBySender(Object sender,int firstindex,int maxresult);
	/**
	 * 分页查找发出邮件
	 */
	public QueryResult<Email> findByProperty(String propertyName, Object value,int firstindex,int maxresult);
	/**
	 * 分页查找接收邮件
	 * @param receiver
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<Email> findByReceiver(Object receiver,int firstindex,int maxresult);

	public abstract Email merge(Email detachedInstance);

	public abstract void attachDirty(Email instance);

	public abstract void attachClean(Email instance);

	public abstract List<Email> splitPage(int startRow);

}